package cam.School.DataTransfertObject;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;


public class UserDTO extends PersonDTO implements Serializable, java.security.Principal {

    // Constants ----------------------------------------------------------------------------------

    private static final long serialVersionUID = 1L;

    // Properties ---------------------------------------------------------------------------------
    public String username;
    private Set<Role> roles;
    public enum Role {
        Low, Average, High, Admin
    };
    // Getters/setters ----------------------------------------------------------------------------

    @Override
	public String getName() {
		return username;
	}
	

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Date getFirstLogin() {
		return firstLogin;
	}
	public void setFirstLogin(Date firstLogin) {
		this.firstLogin = firstLogin;
	}

	public Date getLastLogin() {
		return lastLogin;
	}

	public void setLastLogin(Date lastLogin) {
		this.lastLogin = lastLogin;
	}

	public boolean isOnline() {
		return isOnline;
	}

	public void setOnline(boolean isOnline) {
		this.isOnline = isOnline;
	}


	public Set<Role> getRoles() {
		return roles;
	}
	public void setRoles(Set<Role> roles) {
		this.roles = roles;
	}	
}